<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
    <title>打印医嘱</title>
</head>
<style type="text/css">
    p {
        font-family:"楷体";
        margin: 0;
    }
</style>
<style  media="print" type="text/css">
    .noPrint{DISPLAY: none;}
    .PageNext {
        page-break-after: always;
    }
</style>
<body>
<div>
    <div style="width: 20cm;" align="center">
        <div th:each="item : ${longList}">
            <table width="800px" >
                <tr>
                    <th style="text-align: right" width="20%">患者姓名:</th>
                    <td width="10%"><p th:text="${patientName}"></p></td>
                    <td colspan="6" width="30%"></td>
                    <th  width="20%">患者病历号:</th>
                    <td style="text-align: left" width="20%"><p th:text="${medicalId}"></p></td>
                </tr>
                <tr>
                    <th style="text-align: center" colspan="10">长期医嘱</th>
                </tr>
                <tr>
                    <table border="1px"  cellpadding="0" cellspacing="0" width="800px">
                        <tr>
                            <div th:each="titleDatas : ${item.titleDatas}">
                                <th width="15%" style="text-align: center"><p  th:text="${titleDatas}"></p></th>
                            </div>
                        </tr>
                        <tr th:each="contentDatas : ${item.contentDatas}">
                            <div th:each="data : ${contentDatas}">
                                <td style="white-space: pre-wrap;word-break:break-all;word-wrap:break-word"><p  th:text="${data}"></p></td>
                            </div>
                        </tr>
                    </table>
                </tr>
            </table>
            <!--分页-->
            <div class="PageNext">
            </div>
        </div>
        <div th:each="item : ${tempList}">
            <table width="800px" >
                <tr>
                    <th style="text-align: right" width="20%">患者姓名:</th>
                    <td width="10%"><p th:text="${patientName}"></p></td>
                    <td colspan="6" width="30%"></td>
                    <th  width="20%">患者病历号:</th>
                    <td style="text-align: left" width="20%"><p th:text="${medicalId}"></p></td>
                </tr>
                <tr>
                    <th style="text-align: center" colspan="10">临时医嘱</th>
                </tr>
                <tr>
                    <table border="1px"  cellpadding="0" cellspacing="0" width="800px">
                        <tr>
                            <div th:each="titleDatas : ${item.titleDatas}">
                                <th width="15%" style="text-align: center"><p  th:text="${titleDatas}"></p></th>
                            </div>
                        </tr>
                        <tr th:each="contentDatas : ${item.contentDatas}">
                            <div th:each="data : ${contentDatas}">
                                <td style="white-space: pre-wrap;word-break:break-all;word-wrap:break-word"><p  th:text="${data}"></p></td>
                            </div>
                        </tr>
                    </table>
                </tr>
            </table>
            <!--分页-->
            <div class="PageNext">
            </div>
        </div>
        <table width="800" height="30" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
                <td align="right"><button  class="noPrint" onClick="window.print()">打印</button>&nbsp;</td>
            </tr>
        </table>
    </div>
</div>
</body>
</html>